/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*Realizzazione della classe Locale...non ho inserito username e password come
 variabili di istanza perchè non sappiamo come sarà gestita l'autenticazione
 che sarà nota solo dopo lo spike di OpenID*/
package bynightClasses;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Ivan
 */
@Entity
@Table(name="LOCALE", catalog="", schema="APP")
@NamedQueries({
    @NamedQuery(name="Locale.findByName", query="SELECT l FROM LOCALE l WHERE l.nome= :nome")
})
public class Locale implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String nome;
    private String proprietario;
    private String telefono;
    private String partitaIva;
    private String indirizzo;
    private String orario;
    private String email;
    private int numPosti;
    private String username;
    private String password;
    private String openID;
    
    /**
     * Get the value of openID
     *
     * @return the value of openID
     */
    public String getOpenID() {
        return openID;
    }

    /**
     * Set the value of openID
     *
     * @param openID new value of openID
     */
    public void setOpenID(String openID) {
        this.openID = openID;
    }

    /**
     * Get the value of password
     *
     * @return the value of password
     */
    public String getPassword() {
        return password;
    }

    /**
     * Set the value of password
     *
     * @param password new value of password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * Get the value of username
     *
     * @return the value of username
     */
    public String getUsername() {
        return username;
    }

    /**
     * Set the value of username
     *
     * @param username new value of username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Get the value of numPosti
     *
     * @return the value of numPosti
     */
    public int getNumPosti() {
        return numPosti;
    }

    /**
     * Set the value of numPosti
     *
     * @param numPosti new value of numPosti
     */
    public void setNumPosti(int numPosti) {
        this.numPosti = numPosti;
    }

    /**
     * Get the value of email
     *
     * @return the value of email
     */
    public String getEmail() {
        return email;
    }

    /**
     * Set the value of email
     *
     * @param email new value of email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * Get the value of orario
     *
     * @return the value of orario
     */
    public String getOrario() {
        return orario;
    }

    /**
     * Set the value of orario
     *
     * @param orario new value of orario
     */
    public void setOrario(String orario) {
        this.orario = orario;
    }

    /**
     * Get the value of indirizzo
     *
     * @return the value of indirizzo
     */
    public String getIndirizzo() {
        return indirizzo;
    }

    /**
     * Set the value of indirizzo
     *
     * @param indirizzo new value of indirizzo
     */
    public void setIndirizzo(String indirizzo) {
        this.indirizzo = indirizzo;
    }

    /**
     * Get the value of partitaIva
     *
     * @return the value of partitaIva
     */
    public String getPartitaIva() {
        return partitaIva;
    }

    /**
     * Set the value of partitaIva
     *
     * @param partitaIva new value of partitaIva
     */
    public void setPartitaIva(String partitaIva) {
        this.partitaIva = partitaIva;
    }

    /**
     * Get the value of telefono
     *
     * @return the value of telefono
     */
    public String getTelefono() {
        return telefono;
    }

    /**
     * Set the value of telefono
     *
     * @param telefono new value of telefono
     */
    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    /**
     * Get the value of proprietario
     *
     * @return the value of proprietario
     */
    public String getProprietario() {
        return proprietario;
    }

    /**
     * Set the value of proprietario
     *
     * @param proprietario new value of proprietario
     */
    public void setProprietario(String proprietario) {
        this.proprietario = proprietario;
    }

    /**
     * Get the value of nome
     *
     * @return the value of nome
     */
    public String getNome() {
        return nome;
    }

    /**
     * Set the value of nome
     *
     * @param nome new value of nome
     */
    public void setNome(String nome) {
        this.nome = nome;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Locale)) {
            return false;
        }
        Locale other = (Locale) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bynightClasses.Locale[ id=" + id + " ]";
    }
    
}
